import { request } from "@/utils/request";
export function addChildrenGoods(data: any) {
  return request({
    url: `api/scComProduct/addProduct.php`,
    method: "POST",
    headers: {
      "Content-Type": "multipart/form-data"
    },
    data,
  });
}
export function getChildrenGoods(scId:any) {
  return request({
    url: `api/scComProduct/getAllProduct.php?scId=${scId}`,
    method: "GET",
  });
}
export function GetChildrenGoodsInfo(pId:any) {
  return request({
    url: `api/scComProduct/getOneProduct.php?pId=${pId}`,
    method: "GET",
  });
}
export function EditChildrenGoods(data: any,pId:any) {
  return request({
    url: `api/scComProduct/updateProduct.php?pId=${pId}`,
    method: "POST",
    headers: {
      "Content-Type": "multipart/form-data",
    },
    data,
  });
}
export function DelChildrenGoods(pId:any) {
  return request({
    url: `api/scComProduct/delProduct.php?pId=${pId}`,
    method: "GET",
  });
}
